package com.zhongsou.souyue;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.widget.ImageView;
import com.zhongsou.souyue.log.Logger;
import com.zhongsou.souyue.log.LoggerConfig;

import java.util.InputMismatchException;

public class MyActivity extends Activity {
    private ImageView ivImage1,ivImage2,ivImage3,ivImage4,ivImage5,ivImage6;
    /**
     * Called when the activity is first created.
     */

    //图片网址
    //http://c.hiphotos.baidu.com/image/pic/item/9345d688d43f87940e175e8ed11b0ef41ad53aa1.jpg
    //http://a.hiphotos.baidu.com/image/pic/item/a8ec8a13632762d07fb83379a2ec08fa503dc676.jpg
    //http://a.hiphotos.baidu.com/image/pic/item/f2deb48f8c5494ee003898a12ff5e0fe99257e74.jpg
    //http://d.hiphotos.baidu.com/image/w%3D230/sign=0a0db8ddb119ebc4c078719ab227cf79/0bd162d9f2d3572c62e31b648813632762d0c301.jpg
    //http://b.hiphotos.baidu.com/image/pic/item/2f738bd4b31c8701c0b6375e257f9e2f0708ff02.jpg
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        System.out.println("Environment.getDataDirectory().getAbsolutePath()  = " + Environment.getDataDirectory().getAbsolutePath());
        System.out.println("Environment.getDownloadCacheDirectory().getAbsolutePath()  = " + Environment.getDownloadCacheDirectory().getAbsolutePath());
        System.out.println("Environment.getExternalStorageDirectory().getAbsolutePath() = "+Environment.getExternalStorageDirectory().getAbsolutePath());
        System.out.println("Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath() = "+Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
        System.out.println("Environment.getExternalStorageState() = "+Environment.getExternalStorageState());
        System.out.println("Environment.getRootDirectory().getAbsolutePath() = "+Environment.getRootDirectory().getAbsolutePath());
        LoggerConfig config = new LoggerConfig(true,true,"abcd.log");
        Logger.initLogger(this,config);
        Logger.i("myActivity","MyActivity.name","qitaxiaoxi");
        Logger.e("myActivity", "MyActivity.name", "qitaxiaoxi", new InputMismatchException("唉，咋又错了呢"), "name", "zhou", "zhou", "wo", "wo", "zhou");
    }

}
